<cfcomponent displayname="Authenticator" output="false">
	<cffunction name="init" access="public" returntype="Any" output="false">
		<cfargument name="ESAPI" required="true" />
		<cfset variables.ESAPI = arguments.ESAPI>
		<cfreturn this />
	</cffunction>
	
	<cffunction name="getUser" access="public" returntype="void" output="false">
		<cfset var user = createObject('component','cfesapi.org.owasp.esapi.User').init(variables.ESAPI) />
		<cfset setCurrentUser(user) />
	</cffunction>
	
	<cffunction name="getCurrentUser" access="public" returntype="cfesapi.org.owasp.esapi.user" output="false">
		<cfreturn variables.ESAPI.sessionFacade().getSessionUser() />
	</cffunction>
	
	<cffunction name="setCurrentUser" access="public" returntype="void" output="false">
		<cfargument name="user" type="cfesapi.org.owasp.esapi.user" />
		
		<cfset variables.ESAPI.sessionFacade().setSessionUser(arguments.user) />
		<cfset variables.ESAPI.sessionFacade().setSessionProperty("loggingID", createUUID()) />
	</cffunction>
</cfcomponent>